Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi language support #282

Closed

Conversation

QuadrupleTurbo
Copy link
Contributor

Added

  • Multiple language support.
  • Client can save their preferred language using the misc options save settings feature, the language will apply on join.
  • Language template dumper command vmenuclient dumplang (set to be only for admins in permissions.cfg).

Usage

Setting a default language
In your fxmanifest.lua, set the default language for the client by setting default_language to your preferred language from the config/languages folder. Here's an example:

-- The default language of the menu
default_language "English"

Adding new languages
To add languages, dump the default language by executing the command vmenuclient dumplang client side, locate the template in your config/languages folder which will be named TEMPLATE.json, rename TEMPLATE.json to whatever language you want, then in your fxmanifest.lua edit the languages convar for example:

-- Add the names of the jsons added to config/languages here in the current format
languages 'English, French, Polish, German'

Editing the language config

Format

{
    "Original Text": "Translated Text"
}

Example

{
    "Main Menu": "главное меню",
}

@TomGrobbe
Copy link
Owner

I'll take some time soon to go through this and all other PR's. I've been very busy recently, but I will be looking into it I promise!

@TomGrobbe TomGrobbe added needs testing Needs more testing before anything can/will be done. needs review big change enhancement New feature or request labels Mar 4, 2023
@TomGrobbe TomGrobbe changed the base branch from master to development March 4, 2023 17:33
@TomGrobbe
Copy link
Owner

Could you resolve the merge conflicts please so I can go over the review again

@QuadrupleTurbo
Copy link
Contributor Author

Oh my bad, in 10 mins.

@TomGrobbe
Copy link
Owner

No rush, it'll probably take a bit of time for me to review this properly. There have also been some changes and other PR's that were merged earlier today so those will need to have the translations added as well.

ghost pushed a commit to ProjectFairnessLabs/PF-vMenu that referenced this pull request Jun 22, 2023
Language settings - Multi language support by @QuadrupleTurbo
As seen here on: TomGrobbe#282
Repository owner deleted a comment from skyxkiing Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big change enhancement New feature or request needs review needs testing Needs more testing before anything can/will be done.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants